<!doctype html>
<html lang="zh-hans" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>编辑博客</title>
    <link rel="stylesheet" href="css/edit.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="editor.md/css/editormd.min.css">
</head>
<body>
    <div class="nav">
        <img src="img/logo2.jpg" alt="logo 图">
        <span class="title" th:text="${user.nickname} + '的博客'">作者昵称</span>
        <span class="spacer"></span>
        <a href="/blog0124/">主页</a>
        <a href="/blog0124/edit.html">写博客</a>
        <a href="/blog0124/login.html">退出登录</a>
    </div>

    <div class="blog-edit-container">
        <form method="post" action="/blog0124/save-article">
            <div class="title">
                <input type="text" placeholder="请写文章标题" id="title" name="title">
                <button id="submit">发布文章</button>
            </div>
            <div id="editor">
                <textarea name="content" style="..."></textarea>
            </div>
        </form>
    </div>

    <script src="js/jquery.min.js"></script>
    <script src="editor.md/lib/marked.min.js"></script>
    <script src="editor.md/lib/prettify.min.js"></script>
    <script src="editor.md/editormd.js"></script>
    <script>
        editormd('editor', {
            width: '100%',
            height: 'calc(100% - 50px)',
            markdown: '# 请使用 markdown 格式写文章正文',
            path: 'editor.md/lib/',
            saveHTMLToTextarea: true
        });
    </script>

</body>
</html>